/** 请求并进行错误判断 */
export default async function apiSv(fun: any, params: any) {
  try {
    let data = await fun(params)
    if (!data.status) {
      throw new M.errors.TipsError(data.msg)
    }
    return data
  } catch (e) {
    return Promise.reject(e)
  }
}